// import Vue from 'vue'
import {mapState} from "vuex";

// const mixinsComputed = Vue.config.optionMergeStrategies.computed
// const mixinsMethods = Vue.config.optionMergeStrategies.methods

const mixin = {
  data() {
    return {
      loginUser: {},
      tableSize: 'mini',
      maxdiv: false,
      formShowFlag: true,
    }
  },
  computed: {
    ...mapState({
      // userinfo: state => state.user.userinfo,
      permissionList: state => state.user.permissionList,
      userLevel: state => state.user.userLevel,
      info: state => state.user.info,
      layoutMode: state => state.app.layout,
      navTheme: state => state.app.theme,
      primaryColor: state => state.app.color,
      colorWeak: state => state.app.weak,
      multipage: state => state.app.multipage,//多页签设置
      fixedHeader: state => state.app.fixedHeader,
      fixSiderbar: state => state.app.fixSiderbar,
      contentWidth: state => state.app.contentWidth,
      autoHideHeader: state => state.app.autoHideHeader,
      sidebarOpened: state => state.app.sidebar.opened,
      showAllMenuFLag: state => state.app.showAllMenuFLag
    })
  },
  methods: {
    /**
     * 禁止输入空格
     * @param value
     * @param $event
     */
    inputTrim({value, $event}) {
      if ($event && $event.keyCode === 32) {
        $event.returnValue = false
      }
    },
    maximize(maxdiv) {
    },
  }
}

const mixinDevice = {
  computed: {
    ...mapState({
      device: state => state.app.device,
    })
  },
  methods: {
    isMobile() {
      return this.device === 'mobile'
    },
    isDesktop() {
      return this.device === 'desktop'
    }
  }
}

const mixinVariable = {
  data() {
    return {
      
      toubaodanhaoSelect:{
        '01':'投保单号',
        '02':'汇交单号',
        '03':'学平险受单号',
      },
      tedingyaosuSelect:{
        '01': '成品油',
        '02': '稀土',
        '03': '建筑服务',
        '04': '货物运输',
        '05': '不动产销售',
        '06': '不动产租赁',
        '07': '代收车船使用税',
        '08': '通行费',
        '09': '旅客运输',
        '10': '医疗服务',
        '11': '农产品',
        '12': '拖拉机和联合收割机',
        '13': '机动车',
        '14': '光伏收购',
        '15': '卷烟',
      },


      lzfptdyslxdm: { //蓝字发票特定要素类型代码
        '01': '成品油发票',
        '02': '稀土发票',
        '03': '建筑服务发票',
        '04': '货物运输服务发票',
        '05': '不动产销售服务发票',
        '06': '不动产租赁服务发票',
        '07': '代收车船税',
        '08': '通行费',
        '09': '旅客运输服务发票',
        '10': '医疗服务（住院）发票',
        '11': '医疗服务（门诊）发票',
        '12': '自产农产品销售发票',
        '13': '拖拉机和联合收割机发票',
        '14': '机动车',
        '15': '二手车',
        '16': '农产品收购发票',
        '17': '光伏收购发票',
        '18': '卷烟发票'
      },
      lzfppzdm:{ //蓝字发票票种代码
        '01': '增值税专用发票',
        '02': '普通发票',
        '03': '机动车统一销售发票',
        '04': '二手车统一销售发票'
      },
      lzfppzdmArr: [ //蓝字发票票种代码
        {statusType:'01',statusName:'增值税专用发票'},
        {statusType:'02',statusName:'普通发票'},
        {statusType:'03',statusName:'机动车统一销售发票'},
        {statusType:'04',statusName:'二手车统一销售发票'}
      ],
      chyydm:{ //红字发票冲红原因代码
        '01': '开票有误',
        '02': '销货退回',
        '03': '服务中止',
        '04': '销售折让'
      },
      chyydmArr: [ //红字发票冲红原因代码
        {statusType:'01',statusName:'开票有误'},
        {statusType:'02',statusName:'销货退回'},
        {statusType:'03',statusName:'服务中止'},
        {statusType:'04',statusName:'销售折让'}
      ],
      fphxz:{ //发票行性质
        '00': '正常行',
        '01': '折扣行',
        '02': '被折扣行'
      },
      yhzcbs:{ //优惠政策标识
        '01': '简易征收',
        '02': '稀土产品',
        '03': '免税',
        '04': '不征税',
        '05': '先征后退',
        '06': '100%先征后退',
        '07': '50%先征后退',
        '08': '按3%简易征收',
        '09': '按5%简易征收',
        '10': '按5%简易征收减按1.5%计征',
        '11': '即征即退30%',
        '12': '即征即退50%',
        '13': '即征即退70%',
        '14': '即征即退100%',
        '15': '超税负3%即征即退',
        '16': '100%超税负8%即征即退',
        '17': '50%超税负12%即征即退',
        '18': '按3%超税负6%即征即退',
      },
      lzfpbz:{ //蓝字发票标志
        'Y': '蓝字发票',
        'N': '红字发票'
      },
      zzsjzjtDmList:[ //增值税即征即退代码
        {statusType:'01',statusName:'软件产品发票'},
        {statusType:'02',statusName:'资源综合利用产品发票'},
        {statusType:'03',statusName:'管道运输服务发票'},
        {statusType:'04',statusName:'有形动产融资租赁服务'},
        {statusType:'05',statusName:'有形动产融资性售后回租服务发票'},
        {statusType:'06',statusName:'新型墙体材料发票'},
        {statusType:'07',statusName:'风力发电产品发票'},
        {statusType:'08',statusName:'光伏发电产品发票'},
        {statusType:'09',statusName:'动漫软件产品发票'},
        {statusType:'10',statusName:'飞机维修劳务发票'},
        {statusType:'11',statusName:'黄金发票'},
        {statusType:'12',statusName:'铂金发票'}
      ],
      tdysList:[ //特定要素
        {statusType:'01',statusName:'成品油发票'},
        {statusType:'02',statusName:'稀土发票'},
        {statusType:'03',statusName:'建筑服务发票'},
        {statusType:'04',statusName:'货物运输服务发票'},
        {statusType:'05',statusName:'不动产销售服务发票'},
        {statusType:'06',statusName:'不动产租赁服务发票'},
        {statusType:'07',statusName:'代收车船税'},
        {statusType:'08',statusName:'通行费'},
        {statusType:'09',statusName:'旅客运输服务发票'},
        {statusType:'10',statusName:'医疗服务（住院）发票'},
        {statusType:'11',statusName:'医疗服务（门诊）发票'},
        {statusType:'12',statusName:'自产农产品销售发票'},
        {statusType:'13',statusName:'拖拉机和联合收割机发票'},
        {statusType:'14',statusName:'机动车'},
        {statusType:'15',statusName:'二手车'},
        {statusType:'16',statusName:'农产品收购发票'},
        {statusType:'17',statusName:'光伏收购发票'},
        {statusType:'18',statusName:'卷烟发票'}
      ],
      sgfplxDmList:[ //收购发票类型代码
        {statusType:'01',statusName:'农产品收购发票'},
        {statusType:'02',statusName:'光伏收购发票'},
        {statusType:'03',statusName:'二手车收购发票'}
      ],
      ckywsyzcDmList:[ //出口业务适用政策代码
        {statusType:'01',statusName:'退税政策'},
        {statusType:'02',statusName:'免税政策'},
        {statusType:'03',statusName:'征税政策'}
      ],
      jsfsList:[ //结算方式
        {statusType:'01',statusName:'现金'},
        {statusType:'02',statusName:'银行转账'},
        {statusType:'03',statusName:'票据'},
        {statusType:'04',statusName:'第三方支付'},
        {statusType:'05',statusName:'预付卡'},
        {statusType:'99',statusName:'其他'}
      ],
      kprzjlxOption:[ //证件类型
        {statusType:'01',statusName:'居民身份证'},
        {statusType:'02',statusName:'护照'},
      ],
      lzfpbzArr:[
        {statusType:'Y',statusName:'蓝字发票'},
        {statusType:'N',statusName:'红字发票'}
      ],
      fppz:{ //发票票种
        '01': '全电专',
        '02': '全电普'
      },
      fppzList: [ //发票票种
        {statusType:'01',statusName:'全电专'},
        {statusType:'02',statusName:'全电普'}
      ],
      uploadStatus:{ //上传状态
        '0': '上传中',
        '1': '上传成功',
        '2': '上传失败'
      },
      uploadStatusArr: [ //上传状态
        {statusType:'0',statusName:'上传中'},
        {statusType:'1',statusName:'上传成功'},
        {statusType:'2',statusName:'上传失败'}
      ],
      hzqrxxztdm:{ //红字确认信息状态代码
        '00': '已保存未申请',
        '99': '内部作废',
        '01': '无需确认',
        '02': '销方录入待购方确认',
        '03': '购方录入待销方确认',
        '04': '购销双方已确认',
        '05': '作废（销方录入购方否认）',
        '06': '作废（购方录入销方否认）',
        '07': '作废（超72小时未确认）',
        '08': '作废（发起方撤销）'
      },
      hzqrxxztdmArr:[ //红字确认单状态
        {statusType:'01',statusName:'无需确认'},
        {statusType:'02',statusName:'销方录入待购方确认'},
        {statusType:'03',statusName:'购方录入待销方确认'},
        {statusType:'04',statusName:'购销双方已确认'},
        {statusType:'05',statusName:'作废（销方录入购方否认）'},
        {statusType:'06',statusName:'作废（购方录入销方否认）'},
        {statusType:'07',statusName:'作废（超72 小时未确认）'},
        {statusType:'08',statusName:'作废（发起方撤销）'},
        {statusType:'00',statusName:'已保存未申请'},
        {statusType:'99',statusName:'内部作废'}],
      qrjg:{ //确认结果
        '1': '成功',
        '2': '失败',
        '0': '确认中'
      },
      qrjgArr:[ //确认结果
        {statusType:'1',statusName:'成功'},
        {statusType:'2',statusName:'失败'},
        {statusType:'0',statusName:'确认中'}
      ],
      qrlx:{ //确认类型
        'Y': '同意',
        'N': '不同意'
      },
      qrlxArr:[{statusType:'Y',statusName:'同意'},{statusType:'N',statusName:'不同意'}], //确认类型
      lrfsf:{ //录入方身份
        '0': '销方',
        '1': '购方'
      },
      lrfsfArr: [{statusType:'0',statusName:'销方'},{statusType:'1',statusName:'购方'}], //录入方身份
      sfzzfpbz:{ //是否纸质发票标志
        'Y': '纸质发票',
        'N': '电子发票'
      },
      ykjhzfpbz:{ //已开具红字发票标志
        'Y': '已开具',
        'N': '未开具'
      },
      invoicingStatus:{ //开具状态
        '0': '已保存',
        '1': '开票成功',
        '2': '开票失败'
      },
      invoicingStatusList:[
        {statusType:'0',statusName:'已保存'},
        {statusType:'1',statusName:'开票成功'},
        {statusType:'2',statusName:'开票失败'}
      ],
      invoiceStatusArr:[
        {statusType:'1',statusName:'正常'},
        {statusType:'2',statusName:'作废'},
        {statusType:'3',statusName:'已红冲'},
        {statusType:'4',statusName:'部分红冲'},
        {statusType:'5',statusName:'全额冲红'}
      ],
      yxbz:{ //有效标志
        'Y': '有效',
        'N': '无效'
      },
      kjzt:{ //开具状态
        'Y': '开具成功',
        'N': '开具失败'
      },
      executionStatus:{ //执行1状态
        '0':'进行中',
        '1':'成功',
        '2':'失败'
      },
      riskType:{ //风险纳税人类型
        '01':'Ⅰ类（高风险）纳税人',
        '02':'Ⅱ类（中风险）纳税人',
        '03':'Ⅲ类（低风险）纳税人',
        '04':'Ⅳ类（无风险）纳税人'
      },
      riskFlag:{ //风险纳税人标志
        'Y':'风险纳税人',
        'N':'正常纳税人'
      },
      yxbzArr:[{statusType:'Y',statusName:'有效'},{statusType:'N',statusName:'无效'}], //有效标志
      executionStatusArr:[{statusType:0,statusName:'失败'},{statusType:1,statusName:'成功'}], //执行1状态
      executionStatusArr1:[{statusType:0,statusName:'进行中'},{statusType:1,statusName:'成功'},{statusType:2,statusName:'失败'}], //执行1状态1
      sqzt:{
        '1': '申请成功',
        '2': '申请失败',
        '0': '已保存'
      },
      sqztArr:[ //全电红字确认单申请中的申请状态
        {statusType:'1',statusName:'申请成功'},
        {statusType:'2',statusName:'申请失败'},
        {statusType:'0',statusName:'已保存'}
      ],
      postType:{ //岗位类型
        '1': '普通岗',
        '2': '汇总岗'
      },
      postTypeArr:[{statusType:'1',statusName:'普通岗'},{statusType:'2',statusName:'汇总岗'}], //岗位类型
      enterpriseTypeArr:[ //企业类型
        {statusType:'1',statusName:'金融保险业'},
        {statusType:'2',statusName:'一般企业'},
        {statusType:'3',statusName:'事业单位'},
        {statusType:'4',statusName:'社会团体'}
      ],
      fieldTypeArr:[ //行业类别
        {statusType:'1',statusName:'金融企业'},
        {statusType:'2',statusName:'保险企业'},
        {statusType:'3',statusName:'工业企业'},
        {statusType:'4',statusName:'其他企业'}
      ],
      taxpayerTypeArr:[ //纳税主体类别
        {statusType:'1',statusName:'居民企业'},
        {statusType:'2',statusName:'非居民企业'}
      ],
      label:{ //特定要素标签分类
        '01': '成品油',
        '02': '稀土',
        '03':'建筑服务',
        '04':'货物运输',
        '05':'不动产销售',
        '06': '不动产租赁',
        '07': '代收车船使用税',
        '08':'通行费',
        '09':'旅客运输',
        '10':'医疗服务',
        '11': '农产品',
        '12': '拖拉机和联合收割机',
        '13':'机动车',
        '14':'光伏收购',
        '15':'卷烟'
      },
      gmfsfwzrrList:{ //购买方是否为自然人
        '01': '是',
        '02': '否',
      },
      labelArr:[ //特定要素标签分类
        {statusType:'01',statusName:'成品油'},
        {statusType:'02',statusName:'稀土'},
        {statusType:'03',statusName:'建筑服务'},
        {statusType:'04',statusName:'货物运输'},
        {statusType:'05',statusName:'不动产销售'},
        {statusType:'06',statusName:'不动产租赁'},
        {statusType:'07',statusName:'代收车船使用税'},
        {statusType:'08',statusName:'通行费'},
        {statusType:'09',statusName:'旅客运输'},
        {statusType:'10',statusName:'医疗服务'},
        {statusType:'11',statusName:'农产品'},
        {statusType:'12',statusName:'拖拉机和联合收割机'},
        {statusType:'13',statusName:'机动车'},
        {statusType:'14',statusName:'光伏收购'},
        {statusType:'15',statusName:'卷烟'}
      ],
      diffTaxationArr:[ //差额征税
        {statusType:'Y',statusName:'是'},
        {statusType:'N',statusName:'否'}
      ],
      collectionAndWithdrawalArr:[ //即征即退代码集合
        {statusType:'01',statusName:'增值税即征即退-软件产品'},
        {statusType:'02',statusName:'增值税即征即退-资源综合利用产品'},
        {statusType:'03',statusName:'增值税即征即退-管道运输服务'},
        {statusType:'04',statusName:'增值税即征即退-有形动产融资租赁服务'},
        {statusType:'05',statusName:'增值税即征即退-有形动产融资性售后回租服务'},
        {statusType:'06',statusName:'增值税即征即退-新型墙体材料'},
        {statusType:'07',statusName:'增值税即征即退-风力发电产品'},
        {statusType:'08',statusName:'增值税即征即退-光伏发电产品'},
        {statusType:'09',statusName:'增值税即征即退-动漫软件产品'},
        {statusType:'10',statusName:'增值税即征即退-飞机维修劳务'},
        {statusType:'11',statusName:'增值税即征即退-黄金'},
        {statusType:'12',statusName:'增值税即征即退-铂金'}
      ],
      taxManagementArr:[ //增值税特殊管理
        {statusType:'01',statusName:'简易征收'},
        {statusType:'02',statusName:'稀土产品'},
        {statusType:'03',statusName:'免税'},
        {statusType:'04',statusName:'不征税'},
        {statusType:'05',statusName:'先征后退'},
        {statusType:'06',statusName:'100%先征后退'},
        {statusType:'07',statusName:'50%先征后退'},
        {statusType:'08',statusName:'按3%简易征收'},
        {statusType:'09',statusName:'按5%简易征收'},
        {statusType:'10',statusName:'按5%简易征收减按1.5%计征'},
        {statusType:'11',statusName:'即征即退30%'},
        {statusType:'12',statusName:'即征即退50%'},
        {statusType:'13',statusName:'即征即退70%'},
        {statusType:'14',statusName:'即征即退100%'},
        {statusType:'15',statusName:'超税负3%即征即退'},
        {statusType:'16',statusName:'超税负8%即征即退'},
        {statusType:'17',statusName:'超税负12%即征即退'},
        {statusType:'18',statusName:'超税负6%即征即退'}
      ],
      jsffList: [ //计税方法
        {statusType:'1',statusName:'一般计税'},
        {statusType:'2',statusName:'简易计税'},
        {statusType:'3',statusName:'免抵退税'},
        {statusType:'4',statusName:'免税'}
      ],
      zsxmList: [ //征税项目
        {statusType:'01',statusName:'销售货物'},
        {statusType:'02',statusName:'提供加工修理修配劳务'},
        {statusType:'03',statusName:'提供服务'},
        {statusType:'04',statusName:'销售不动产'},
        {statusType:'05',statusName:'销售无形资产'}
      ],
      sfyzList: [ //是否预征
        {statusType:'0',statusName:'否'},
        {statusType:'1',statusName:'是'}
      ],
      yzllxList: [ //预征率类型
        {statusType:'01',statusName:'销售货物'},
        {statusType:'02',statusName:'提供加工修理修配劳务'},
        {statusType:'03',statusName:'提供服务'},
        {statusType:'04',statusName:'销售无形资产'}
      ],
      zcbkdkList:[ //政策不可抵扣
        {statusType:'0',statusName:'否'},
        {statusType:'1',statusName:'是'}
      ],
      sfsyyhbsList: [ //是否使用优惠政策
        {statusType:'01',statusName:'否'},
        {statusType:'02',statusName:'是'}
      ],
      sq68:['3060301010000000000','3060301990000000000','3060302010000000000','3060302020000000000','3060302030000000000','3060302040000000000','3060302990000000000']
    }
  }
}

export {mixin, mixinDevice,mixinVariable}